﻿@model KL.Store.Web.Models.CategoryModel2
<div class="box category">
    <div class="box-heading">
        Kategoriler
    </div>
    <div class="box-content">
        <select name="SelectedCategory" id="@(ViewBag.Id)" class="form-control categorySelect" style = "width:100%;">
            @foreach (var c in Model.Categories)
            {
                <option value="@(c.GroupId)" @{if (c.GroupId == Model.SelectedCategory)
                                               {<text> selected="selected"</text>}}>@(c.GroupName)@(c.GroupId > 0 ? " - " + c.GroupId.ToString() : "")@(!string.IsNullOrEmpty(c.ParentGroupName) ? " (" + c.ParentGroupName + ")" : "")</option>
            }
        </select>
    </div>
</div>
